<template>
    <div>
      <!--项目信息-->
      <div style="margin-top: 25px">
        <el-form
          :model="currentProject"
          :rules="projectRules"
          ref="ruleForm"
          label-width="100px"
          class="demo-ruleForm">
          <el-form-item label="项目名称:" prop="name">
            <el-input v-model="currentProject.name" style="width: 200px" :disabled="true"></el-input>
          </el-form-item>
          <el-form-item label="创建人:" prop="author">
            <span v-model="currentProject.author">{{user.name}}</span>
          </el-form-item>
          <el-form-item label="项目备注:" prop="remarks">
            <el-input type="textarea" v-model="currentProject.remarks" style="width: 360px" :disabled="true"></el-input>
          </el-form-item>
        </el-form>
      </div>

    </div>
</template>

<script>
  export default {
    name: "projectInfo",
    data(){
      return{
        user:JSON.parse(window.sessionStorage.getItem("user")), //将保存在sessionStorage里面的数据根据key值取出来
        projectRules: {
          name: [{ required: true, message: "请输入项目名称", trigger: "blur" }],
          remarks: [{ required: false, message: "请填写项目描述", trigger: "blur" }],
        },
        currentProject: {
          name: '',
          author: '',
          remarks: '',
        },
      }
    },
    mounted() {
      this.currentProject = JSON.parse(window.sessionStorage.getItem("project"));
    },
    methods:{

    },

  }
</script>

<style scoped>

</style>
